#ifndef MULTICLIENT_H_
#define MULTICLIENT_H_
#include <iostream>
#include <string>
#include <exception>
#include <sys/types.h>
#include <unistd.h>
#include <sys/select.h>
#include <netinet/in.h> //in_addr, in6_addr
#include <sys/time.h>
#include <stdio.h>
#include <mysql++/mysql++.h>
#include "../CommFormat.h"
#include "../Serialization.h"
#include "../socket_lib/ClientSocket.h"
#include "../socket_lib/ServerSocket.h"
#include "../socket_lib/SocketException.h"
#include "../db_operation/DbOperation.h"

using namespace std;
using namespace mysqlpp;

const int VLINK_STAT_MSG = 1;
const int VLINK_COTL_MSG = 2;
const int VLINK_PATH_MSG = 3;
const int VLINK_CONF_MSG = 4;
const int VR_ADD_DEL_MSG = 5;
const int TIME_COTL_MSG = 8;
const int ADD_VR = 1;
const int DEL_VR = 2;
const int PHP_SERV_PORT = 3000;
const int VR_SERV_PORT = 2000;
const bool GOOD_CONNECTION = 1;
const bool BAD_CONNECTION = 0;
const int ECHO_MSG = 6;
const int ADDRSTRLEN = 16;

void* multi_select (void*);
void form_path_time (char*, char*);
string form_vrlistlog_sql (string, const bool);
void update_vr_connection (const string, const bool);
void record_to_logfile (ofstream&, const char*, const string, const int, const char*, const char*);

#endif

